package com.hh.test.waitnotify;

public class Mian {

	public static void main(String[] args) {
		Stock stock = new Stock();
		Thread cus = new Thread(new Customer(stock));
		Thread produce = new Thread(new Producer(stock));
		produce.start();
		try {
			Thread.sleep(5000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		cus.start();

		while (true) {
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}
}
